/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sample.entity.com;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author NgoanTT
 */
@Entity
@Table(name = "tblAccount", catalog = "Nong_Nghiep", schema = "dbo")
@NamedQueries({
    @NamedQuery(name = "TblAccount.findAll", query = "SELECT t FROM TblAccount t"),
    @NamedQuery(name = "TblAccount.findByAccountID", query = "SELECT t FROM TblAccount t WHERE t.accountID = :accountID"),
    @NamedQuery(name = "TblAccount.findByUsername", query = "SELECT t FROM TblAccount t WHERE t.username = :username"),
    @NamedQuery(name = "TblAccount.findByPassword", query = "SELECT t FROM TblAccount t WHERE t.password = :password"),
    @NamedQuery(name = "TblAccount.findByLastname", query = "SELECT t FROM TblAccount t WHERE t.lastname = :lastname"),
    @NamedQuery(name = "TblAccount.findByIsAdmin", query = "SELECT t FROM TblAccount t WHERE t.isAdmin = :isAdmin"),
    @NamedQuery(name = "TblAccount.findByUsers", query = "SELECT t FROM TblAccount t WHERE t.users = :users"),
    @NamedQuery(name = "TblAccount.findByAddress", query = "SELECT t FROM TblAccount t WHERE t.address = :address"),
    @NamedQuery(name = "TblAccount.findByCity", query = "SELECT t FROM TblAccount t WHERE t.city = :city"),
    @NamedQuery(name = "TblAccount.findByIntroduction", query = "SELECT t FROM TblAccount t WHERE t.introduction = :introduction"),
    @NamedQuery(name = "TblAccount.findByAge", query = "SELECT t FROM TblAccount t WHERE t.age = :age"),
    @NamedQuery(name = "TblAccount.findByGenre", query = "SELECT t FROM TblAccount t WHERE t.genre = :genre")})
public class TblAccount implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "account_ID", nullable = false, length = 50)
    private String accountID;
    @Basic(optional = false)
    @Column(name = "username", nullable = false, length = 100)
    private String username;
    @Basic(optional = false)
    @Column(name = "password", nullable = false, length = 200)
    private String password;
    @Column(name = "lastname", length = 100)
    private String lastname;
    @Column(name = "isAdmin")
    private Boolean isAdmin;
    @Column(name = "users")
    private Boolean users;
    @Column(name = "address", length = 250)
    private String address;
    @Column(name = "city", length = 150)
    private String city;
    @Column(name = "introduction", length = 500)
    private String introduction;
    @Column(name = "age")
    private Integer age;
    @Column(name = "genre", length = 10)
    private String genre;

    public TblAccount() {
    }

    public TblAccount(String accountID) {
        this.accountID = accountID;
    }

    public TblAccount(String accountID, String username, String password) {
        this.accountID = accountID;
        this.username = username;
        this.password = password;
    }

    public String getAccountID() {
        return accountID;
    }

    public void setAccountID(String accountID) {
        this.accountID = accountID;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getLastname() {
        return lastname;
    }

    public void setLastname(String lastname) {
        this.lastname = lastname;
    }

    public Boolean getIsAdmin() {
        return isAdmin;
    }

    public void setIsAdmin(Boolean isAdmin) {
        this.isAdmin = isAdmin;
    }

    public Boolean getUsers() {
        return users;
    }

    public void setUsers(Boolean users) {
        this.users = users;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getGenre() {
        return genre;
    }

    public void setGenre(String genre) {
        this.genre = genre;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (accountID != null ? accountID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TblAccount)) {
            return false;
        }
        TblAccount other = (TblAccount) object;
        if ((this.accountID == null && other.accountID != null) || (this.accountID != null && !this.accountID.equals(other.accountID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "sample.entity.com.TblAccount[accountID=" + accountID + "]";
    }

}
